package com.bd.rj.frontstage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bd.rj.common.entity.Enterprise;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 白世俊
 * @since 2025-01-03
 */
@Mapper

public interface EnterpriseMapper extends BaseMapper<Enterprise> {
    /**
     * @desc 根据岗位id查询企业电话
     * @author yxh
     */
    @Select("SELECT DISTINCT e.phone FROM post p JOIN enterprise e ON p.eid = e.id WHERE p.eid = #{eid}")
    List<String> selectDistinctPhoneByEid(@Param("eid") Long eid);
}
